<tagLib name="fanwe" />
<include file="Public:header" />
<script type="text/javascript" src="__TMPL__Static/Js/dataList.js"></script>
<div class="handle-btns">
	<form action="__APP__">
		<span>{$Think.lang.DATA_NAME}</span>
		<input class="textinput" type="text" value="{$name}" name="name" size="10" />
		<small></small>
		<span>{$Think.lang.SN}</span>
		<input class="textinput" type="text" value="{$sn}" name="sn" size="10" />
		<small></small>
		<span>{$Think.lang.USER_NANE}</span>
		<input class="textinput" type="text" value="{$user_name}" name="user_name" size="10" />
		<small></small>
		<select name="goods_status">
			<option value="-1" <if condition="$goods_status eq -1">selected</if>>{$Think.lang.GOODS_STATUS}</option>
			<option value="0" <if condition="$goods_status eq 0">selected</if>>{$Think.lang.ORDER_GOODS_STATUS_0}</option> 
			<option value="1" <if condition="$goods_status eq 1">selected</if>>{$Think.lang.ORDER_GOODS_STATUS_1}</option>
			<option value="2" <if condition="$goods_status eq 2">selected</if>>{$Think.lang.ORDER_GOODS_STATUS_2}</option>
		</select>
		<input class="submit_btn" type="submit" value="{$Think.lang.SEARCH}" />
		<input type="hidden" name="{:c('VAR_MODULE')}" value="{$module_name}" />
		<input type="hidden" name="{:c('VAR_ACTION')}" value="index" />
	</form>
</div>
<table id="checkList" class="table-list list" cellpadding="0" cellspacing="0" border="0">
    <thead>
        <tr>
            <th width="26" class="first"><input type="checkbox" onclick="checkAll('checkList')"></th>
            <th width="80"><a href="javascript:sortBy('id','','check')">{$Think.lang.ID}</a></th>
            <th width="120">{$Think.lang.SN}</th>
			<th width="50">头像</th>
			<th width="100">{$Think.lang.USER_NANE}</th>
			<th width="70">{$Think.lang.ORDER_TYPE}</th>
			<th>{$Think.lang.DATA_NAME}</th>
            <th width="70">{$Think.lang.DATA_NUM}</th>
			<th width="60">{$Think.lang.ORDER_SCORE}</th>
            <th width="70">{$Think.lang.GOODS_STATUS}</th>
			<th width="130">{$Think.lang.CREATE_TIME}</th>
            <th width="80">{$Think.lang.HANDLE}</th>
        </tr>
    </thead>
	<?php
		$index = -1;
	?>
    <tbody>
		<foreach name="list" item="item">
		<?php
			$index++;
			$row_count = '';
			if($item['order_type'] == 1)
			{
				$row_count = ' rowspan="2"';
			}
			if($index % 2 == 0)
				$tr_class = ' class="tr'.$item['id'].'"';
			else
				$tr_class = ' class="tr'.$item['id'].' even"';
		?>
        <tr{$tr_class}>
            <td class="first"{$row_count}><input type="checkbox" name="key" value="{$item.id}"></td>
            <td {$row_count}>{$item.id}</td>
            <td {$row_count}>{$item.sn}</td>
            <td><a href="{:adminFormatImgById($item['avatar'])}" target="_blank"><img class="imgTooltip" title="<img src='{:adminFormatImgById($item['avatar'])}' height='200' />" src="{:adminFormatImgById($item['avatar'],100,100)}" height="30" style="border:solid 1px #ccc;" /></a></td>
			<td>{$item.user_name}</td>
            <td>{:getOrderType($item['order_type'])}</td>
			<td align="left">{$item.data_name}</td>
			<td>{$item.data_num}</td>
			<td>{$item.order_score}</td>
			<td>{:getOrderGoodsStatus($item['goods_status'])}</td>
			<td>{:toDate($item['create_time'])}</td>
			<td{$row_count}>
				{:getOrderEdit($item['id'],$item['goods_status'])}
			</td>
        </tr>
		<if condition="$item['order_type'] eq 1">
		<tr{$tr_class} align="left">
			<td colspan="8" class="torder">
				申请理由：{$item.reason}
			</td>
		</tr>
		</if>
		</foreach>
    </tbody>
</table>
<div class="pager">{$page}</div>
<script type="text/javascript">
function showOrder(id)
{
	window.open("__APP__?m=Order&a=show&id=" + id);
}
</script>
<include file="Public:footer" />